<div class="grid_4">       
    <div class="da-panel">
        <div class="da-panel-header">
            <span class="da-panel-title">
                <img alt="" src="<?php echo $this->themeUrl; ?>/files/theme/images/icons/color/monitor.png">
                Chỉnh sửa khách hàng
            </span>
        </div>

        <div id="da-ex-tabs" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
            <?php $this->renderPartial('_tabs', array('model' => $model))?>
            <div style="padding-bottom: 20px;">


                <?php $this->widget('admin.components.widgets.AlertWidget');?>  


                <?php $form=$this->beginWidget('CActiveForm', array(
                        'id'=>'customer-form',
                        'enableClientValidation'=>true,
                        'clientOptions'=>array(
                            'validateOnSubmit'=>true,
                        ),
                        //'enableAjaxValidation'=>true,
                        'htmlOptions' => array('class' => 'da-form')
                    )); ?>

                <?php //echo $form->errorSummary($model); ?>
                <div class="da-form-inline" style="margin-top: 20px;">
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'phone'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->textField($model,'phone',array('maxlength'=>255)); ?>
                                <?php echo $form->error($model,'phone');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'name'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->textField($model,'name',array('maxlength'=>255)); ?>
                                <?php echo $form->error($model,'name');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'password'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->textField($model,'password',array('maxlength'=>32, 'value' => '')); ?>
                                <?php echo $form->error($model,'password');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'gender'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->dropDownList($model, 'gender', $model->genderData, array('empty' => ''))?>
                                <?php echo $form->error($model,'gender');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'status'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->dropDownList($model, 'status', $model->statusData); ?>
                                <?php echo $form->error($model,'status');?>
                            </div>
                        </div>
                    </div>



                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'address'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->textField($model,'address',array('maxlength'=>255)); ?>
                                <?php echo $form->error($model,'address');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'dob'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->textField($model,'dob',array('maxlength'=>255, 'class' => 'datetimepicker')); ?>
                                <?php echo $form->error($model,'dob');?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'is_receive_sms'); ?>
                            <div class="da-form-item large">
                                <?php echo $form->checkBox($model,'is_receive_sms'); ?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'point'); ?>
                            <div class="da-form-item large">
                                <?php echo $model->point; ?>
                            </div>
                        </div>
                    </div>
                    
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'bill_count'); ?>
                            <div class="da-form-item large">
                                <?php echo $model->bill_count; ?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-3-8">
                            <?php echo $form->labelEx($model,'created'); ?>
                            <div class="da-form-item large">
                                <?php echo $model->created; ?>
                            </div>
                        </div>
                    </div>
                    <div class="da-form-row">
                        <div class="da-form-col-2-8">
                            <div class="da-form-item large">
                                <input type="submit" class="da-button blue" value="<?php echo ($model->isNewRecord) ? 'Thêm' : 'Cập nhật';?>">
                            </div>
                        </div>
                    </div>
                </div>
                <?php $this->endWidget(); ?>


            </div>
        </div>

    </div>
</div>       


<script>
    $(function(){
        $("input.datetimepicker").datepicker({ dateFormat: 'yy-mm-dd' });
    });   
</script>